<!-- 用户列表 -->
<div class="pcontent">
<h3>用户管理<a class="btn btn-info btn-sm pull-right" href="javascript:void(0)" id="addNewBtn" onclick="addNewManager(this)" >添加用户</a></h3>
<table class="table table-striped table-bordered table-condensed">
	<tr>
		<th>ID</th>
		<th>账号</th>
		<th>密码</th>
		<th>角色</th>
		<th>操作</th>
	</tr>
<volist name="list" id="li">
	<tr>
		<td  width="40px" align="center">{$li.id}</td>
		<td>{$li.username}</td>
		<td>{$li.password}</td>
		<td>{$li.role}</td>
		<td width="100px" align="center">
			<div class="btn-group"> 
				<a class="btn btn-xs btn-danger" href="manager_del/id/{$li.id}">删除</a>  
			</div>
		</td>
	</tr>
</volist>
</table>
<div class="modal fade" id="user-add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		 <div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">添加用户</h4>
			</div>
			<div class="modal-body">
				<form id="bjy-form" class="form-inline" action="{:U('/Access/manager_save')}" method="post">
					<table class="table table-striped table-bordered table-hover table-condensed">
						<tr>
							<th width="12%">用户名：</th>
							<td>
								<input class="form-control" type="text" name="username">
							</td>
						</tr>
						<tr>
							<th width="12%">密码：</th>
							<td>
								<input class="form-control" type="text" name="password">
							</td>
						</tr>
						<tr>
							<th width="12%">所属组：</th>
							<td>
							<div class=".control-group"><select name="role_id"> 
<volist name="rolelist" id="ro" > 
									<option value="{$ro.id}">{$ro.name}</option>
</volist>
								</select></div>
							</td>
						</tr>
						<tr>
							<th></th>
							<td>
								<input class="btn btn-sm btn-success" type="submit" value="添加">
							</td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div>
</div>
</div>
<script language="javascript">
function addNewManager(obj){
	$('#user-add').modal('show');
}
</script>
<!-- 添加用户 -->